In an example scenario, a method is implemented to protect codes or programs executed on devices against modification or attacks for fraudulent operation. To illustrate, in an example secure boot methodology, a processor in a device generates a digest of a boot code and uses a stored authentication signature of the boot code to validate the digest of the boot code. However, such boot implementation is performed locally by the processor of the device, and is therefore restricted by performance, storage and security of this local processor. Due to cost-constraints, the security of a local secure boot may be limited due to limited computational ability or lack of protection for the boot process, operating memory, and/or validating key. In some cases, an external device is used to validate the authenticity and report the validation result to the processor. However, there may exist multiple attack vectors that would permit an attacker to subvert the secure boot operation and allow fraudulent operation, e.g., modification of the boot code, using a man-in-the-middle device, or modification of the validating root public key or signature.